package com.study.entity;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class Person {
	
	@Autowired
	@Qualifier("student")
	private Student student ;
	
	@PostConstruct
	public void init() {
		System.out.println("init person");
	}
	
	@PreDestroy
	public void destory() {
		System.out.println("idestory person");
	}

	public Person() {
		System.out.println("person constructor");
	}

	public void say() {
		student.say() ;
	}

}
